//
//  OneDayObject.m
//  OneDay
//
//  Created by lanou3g on 15/11/4.
//  Copyright © 2015年 oneDay. All rights reserved.
//

#import "OneDayObject.h"

@implementation OneDayObject

// 自适应高度
- (CGSize)sizeWithText:(NSString *)str font:(NSInteger)font width:(NSInteger)width height:(NSInteger)height
{
    NSDictionary *dic = [NSDictionary dictionaryWithObject:[UIFont systemFontOfSize:font] forKey:NSFontAttributeName];
    CGRect frame = [str boundingRectWithSize:CGSizeMake(width, height) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    return frame.size;
}

@end
